package main

import (
	"goCmdb/internal/router"
	_ "gorm.io/driver/sqlite"
	"log"
	"net/http"
	"time"
)

func main() {
	newRouter := router.NewRouter()
	s := &http.Server{
		Addr:           ":8080",
		Handler:        newRouter,
		ReadTimeout:    10 * time.Second,
		WriteTimeout:   10 * time.Second,
		MaxHeaderBytes: 1 << 20,
	}
	err := s.ListenAndServe()
	if err != nil {
		log.Fatalf("go CMDB 运行时出现致命错误,异常退出!!!")
	}
}
